local leaftype = "plantlike"
local leafscale = 1.4


-- banana tree leaves
minetest.register_node("epic_trees:bananaleaves", {
	description = "Banana Leaves",
	drawtype = leaftype,
	visual_scale = leafscale,
	tiles = {"banana_leaf.png"},
	inventory_image = "banana_leaf.png",
	wield_image = "banana_leaf.png",
	paramtype = "light",
	walkable = false,
	waving = 1,
	groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
	drop = {
		max_items = 1,
		items = {
			{items = {"epic_trees:banana_tree_sapling"}, rarity = 10},
			{items = {"epic_trees:bananaleaves"}}
		}
	},
	sounds = default.node_sound_leaves_defaults(),
	after_place_node = default.after_place_leaves,
})

default.register_leafdecay({
	trunks = {"epic_trees:banana_trunk"},
	leaves = {"epic_trees:bananaleaves", "epic_trees:banana"},
	radius = 3
})

-- orange tree leaves
minetest.register_node("epic_trees:orange_leaves", {
	description = "Orange Leaves",
	drawtype = leaftype,
	visual_scale = leafscale,
	tiles = {"orange_leaves.png"},
	inventory_image = "orange_leaves.png",
	wield_image = "orange_leaves.png",
	paramtype = "light",
	walkable = epic_trees.leafwalk,
	waving = 1,
	groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
	drop = {
		max_items = 1,
		items = {
			{items = {"epic_trees:orange_tree_sapling"}, rarity = 15},
			{items = {"epic_trees:orange_leaves"}}
		}
	},
	sounds = default.node_sound_leaves_defaults(),
	after_place_node = default.after_place_leaves,
})

default.register_leafdecay({
	trunks = {"default:tree"},
	leaves = {"epic_trees:orange_leaves", "epic_trees:orange"},
	radius = 3
})